<template>
  <div class="home-banner">
    <XtxCarousel :swipers='List' :authPlay="true" :duration="2500"/>
  </div>
</template>
<script>
import { findBanner } from '@/api/home'
import { ref } from 'vue'
export default {
  name: 'HomeBanner',
  setup () {
    const List = ref([])
    findBanner().then(resp => { // 图片数据资源
      if (resp.result) {
        List.value = resp.result
      }
    })
    return { List }
  }
}
</script>
<style scoped lang="less">
.home-banner {
  width: 1240px;
  height: 500px;
  position: absolute;
  left:0;
  top:0;
  z-index: 98
}
.xtx-carousel {
  :deep(.carousel-btn.prev) {
    left: 270px;
  }
  :deep(.carousel-indicator) {
    padding-left: 250px;
  }
}
</style>
